import request from '@/utils/request'

// 获取模型数据
export const getModelData = (modelKey, language) => {
    return request({
        url: '/open/cms/model/data/' + modelKey + '/' + language,
        method: 'get'
    })
}

// 提交联系我们信息
export const addContactUs = (data) => {
    return request({
        url: '/open/cms/contact/us/add',
        method: 'post',
        data: data
    })
}

// 获取新闻列表
export const getNewsList = (query) => {
    return request({
        url: '/open/cms/news/list',
        method: 'get',
        params: query
    })
}

// 获取新闻详情
export const getNewsInfo = (query) => {
    return request({
        url: '/open/cms/news/info',
        method: 'get',
        params: query
    })
}

// 获取最新新闻
export const getNewsLasted = (language) => {
    return request({
        url: '/open/cms/news/lasted/' + language,
        method: 'get',
    })
}

// 获取语言列表
export const getLanguageList = () => {
    return request({
        url: '/open/cms/language/list',
        method: 'get',
    })
}

// 增加访问量
export const addVisitCount = () => {
    return request({
        url: '/open/cms/visit/add/count',
        method: 'get',
    })
}
